﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Tormenta.Utils
{
    public class Player: ItemBase
    {
        public Player(Game game)
            : base(game)
        {
            Advantages = new List<Advantage>();
            Disadvantages = new List<Advantage>();
            Expertises = new List<Expertise>();
            Spells = new List<Spell>();
            Items = new List<Item>();

        }

        public string Name { get; set; }

        public string History { get; set; }

        public int Points { get; set; }

        public int Experience { get; set; }

        public int Money { get; set; }

        public int MaxWeight { get; set; }

        private int Weight { get; set; }
        
        #region Features

        //Força
        public int Strength { get; set; }

        //Habilidade
        public int Skill { get; set; }

        //Resistência
        public int Resistance { get; set; }

        //Armadura
        public int Armor { get; set; }


        //Poder de Fogo
        public int FirePower { get; set; } 

        #endregion

        public int SpellPoints { get; private set; }

        public int LifePoints { get; private set; }

        public List<Advantage> Advantages { get; private set; }

        public List<Advantage> Disadvantages { get; private set; }

        public List<Expertise> Expertises { get; private set; }

        public List<Spell> Spells { get; private set; }

        public List<Item> Items { get; private set; }

        
        public bool AddItem(Item item)
        {
            if (this.Weight + item.Weight <= this.MaxWeight)
            {
                this.Items.Add(item);
                this.Weight += item.Weight;
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
